<?php

$host = "127.0.0.1";
$mySqlUser = "root";
$mySqlPassword = "14112534";

$con = mysql_connect($host,$mySqlUser,$mySqlPassword);
mysql_query("USE project;");

if (!$con) {
	header("content-type: text/plain; charset=utf-8");
	die('ไม่สามารถติดต่อฐานขอมูลได้ : ' . mysql_error());
}
mysql_query("SET NAMES UTF8");
 
$result = mysql_query("SELECT name, lastname FROM reservation");

while($row = mysql_fetch_array($result))
{
	echo $row['name'];
	echo "<br />";
	echo $row['lastname'];
	echo "<br />";
}
?>